<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>sock: sock::net::Reactor Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">sock
   &#160;<span id="projectnumber">v0.11</span>
   </div>
   <div id="projectbrief">C++ Network Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacesock.html">sock</a></li><li class="navelem"><a class="el" href="namespacesock_1_1net.html">net</a></li><li class="navelem"><a class="el" href="classsock_1_1net_1_1_reactor.html">Reactor</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classsock_1_1net_1_1_reactor-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">sock::net::Reactor Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>网络反应器  
 <a href="classsock_1_1net_1_1_reactor.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="reactor_8h_source.html">reactor.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sock::net::Reactor:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classsock_1_1net_1_1_reactor.png" usemap="#sock::net::Reactor_map" alt=""/>
  <map id="sock::net::Reactor_map" name="sock::net::Reactor_map">
<area href="classsock_1_1net_1_1detail_1_1_e_poll_reactor.html" title="使用epoll实现的网络反应器 " alt="sock::net::detail::EPollReactor" shape="rect" coords="0,112,182,136"/>
<area href="classsock_1_1net_1_1detail_1_1_select_reactor.html" title="使用select实现的网络反应器 " alt="sock::net::detail::SelectReactor" shape="rect" coords="192,112,374,136"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a47804de81fecd9e153a0893926279197"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197">Event</a> { <br />
&#160;&#160;<a class="el" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a882c20771f64fd23b689438320c1b197">READ</a> = 0x1, 
<a class="el" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a98270db6d3ea12747653b0627a514086">WRITE</a> = 0x2, 
<a class="el" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197aa9284f403794613a8347b16c4b806cdd">ERR</a> = 0x4, 
<a class="el" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a3cf7edae26c7f7b9af0b0f8d9cbc7969">RDERR</a> = READ | ERR, 
<br />
&#160;&#160;<a class="el" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a0e7f9665c5206ccea8e8905e0a603c6a">WRERR</a> = WRITE | ERR, 
<a class="el" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197ac8f0208397c73d7e4e9a353a12e03cae">RDWR</a> = READ | WRITE, 
<a class="el" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197abb336e4beecd5cb2896e832cecd00ca4">ALL</a> = READ | WRITE | ERR
<br />
 }<tr class="memdesc:a47804de81fecd9e153a0893926279197"><td class="mdescLeft">&#160;</td><td class="mdescRight">网络事件类型  <a href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197">More...</a><br /></td></tr>
<tr class="separator:a47804de81fecd9e153a0893926279197"><td class="memSeparator" colspan="2">&#160;</td></tr>
</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3f7030a8a6230487c674853224ddb915"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_reactor.html#a3f7030a8a6230487c674853224ddb915">Reactor</a> (void)</td></tr>
<tr class="separator:a3f7030a8a6230487c674853224ddb915"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad616dbb0d11d2d651b5fd244e0e6c609"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_reactor.html#ad616dbb0d11d2d651b5fd244e0e6c609">~Reactor</a> (void)</td></tr>
<tr class="separator:ad616dbb0d11d2d651b5fd244e0e6c609"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31ff586f2329ba43e73ea5762b4929e7"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_reactor.html#a31ff586f2329ba43e73ea5762b4929e7">addSource</a> (sock_t sock, <a class="el" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197">Event</a> event, <a class="el" href="classsock_1_1net_1_1_net_event_handler.html">NetEventHandler</a> *handler)=0</td></tr>
<tr class="memdesc:a31ff586f2329ba43e73ea5762b4929e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">添加事件源  <a href="#a31ff586f2329ba43e73ea5762b4929e7">More...</a><br /></td></tr>
<tr class="separator:a31ff586f2329ba43e73ea5762b4929e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd768d76883d1217bb4cf10a3820990e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_reactor.html#acd768d76883d1217bb4cf10a3820990e">removeSource</a> (sock_t sock)=0</td></tr>
<tr class="memdesc:acd768d76883d1217bb4cf10a3820990e"><td class="mdescLeft">&#160;</td><td class="mdescRight">移除事件源  <a href="#acd768d76883d1217bb4cf10a3820990e">More...</a><br /></td></tr>
<tr class="separator:acd768d76883d1217bb4cf10a3820990e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9bbc07e2fca79e7c09a0be3d80d313bd"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_reactor.html#a9bbc07e2fca79e7c09a0be3d80d313bd">addSource</a> (<a class="el" href="classsock_1_1net_1_1_socket.html">Socket</a> *sock, <a class="el" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197">Event</a> event, <a class="el" href="classsock_1_1net_1_1_net_event_handler.html">NetEventHandler</a> *handler)=0</td></tr>
<tr class="memdesc:a9bbc07e2fca79e7c09a0be3d80d313bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">添加事件源  <a href="#a9bbc07e2fca79e7c09a0be3d80d313bd">More...</a><br /></td></tr>
<tr class="separator:a9bbc07e2fca79e7c09a0be3d80d313bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add2344de23e45df195bd173d05ba2075"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_reactor.html#add2344de23e45df195bd173d05ba2075">removeSource</a> (<a class="el" href="classsock_1_1net_1_1_socket.html">Socket</a> *sock)=0</td></tr>
<tr class="memdesc:add2344de23e45df195bd173d05ba2075"><td class="mdescLeft">&#160;</td><td class="mdescRight">移除事件源  <a href="#add2344de23e45df195bd173d05ba2075">More...</a><br /></td></tr>
<tr class="separator:add2344de23e45df195bd173d05ba2075"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a479c30f659596b68d0ad820981227ebf"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_reactor.html#a479c30f659596b68d0ad820981227ebf">tick</a> (int timeout=0)=0</td></tr>
<tr class="memdesc:a479c30f659596b68d0ad820981227ebf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tick处理网络事件  <a href="#a479c30f659596b68d0ad820981227ebf">More...</a><br /></td></tr>
<tr class="separator:a479c30f659596b68d0ad820981227ebf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac117f6b319f740f26bae2036f2b754d6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_reactor.html#ac117f6b319f740f26bae2036f2b754d6">setHeartbeatTime</a> (base::mtime_t time)</td></tr>
<tr class="memdesc:ac117f6b319f740f26bae2036f2b754d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置心跳间隔时间  <a href="#ac117f6b319f740f26bae2036f2b754d6">More...</a><br /></td></tr>
<tr class="separator:ac117f6b319f740f26bae2036f2b754d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca3e0bd8eaf38b10118755a5b22fb4c2"><td class="memItemLeft" align="right" valign="top">base::mtime_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_reactor.html#aca3e0bd8eaf38b10118755a5b22fb4c2">getHeartbeatTime</a> (void) const </td></tr>
<tr class="memdesc:aca3e0bd8eaf38b10118755a5b22fb4c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取心跳间隔时间  <a href="#aca3e0bd8eaf38b10118755a5b22fb4c2">More...</a><br /></td></tr>
<tr class="separator:aca3e0bd8eaf38b10118755a5b22fb4c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ac3d9bb4b0f4988c7c174b2febd239b9a"><td class="memItemLeft" align="right" valign="top">base::mtime_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_reactor.html#ac3d9bb4b0f4988c7c174b2febd239b9a">heartbeatTime_</a></td></tr>
<tr class="separator:ac3d9bb4b0f4988c7c174b2febd239b9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>网络反应器 </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a47804de81fecd9e153a0893926279197"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197">sock::net::Reactor::Event</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>网络事件类型 </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a47804de81fecd9e153a0893926279197a882c20771f64fd23b689438320c1b197"></a>READ&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a47804de81fecd9e153a0893926279197a98270db6d3ea12747653b0627a514086"></a>WRITE&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a47804de81fecd9e153a0893926279197aa9284f403794613a8347b16c4b806cdd"></a>ERR&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a47804de81fecd9e153a0893926279197a3cf7edae26c7f7b9af0b0f8d9cbc7969"></a>RDERR&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a47804de81fecd9e153a0893926279197a0e7f9665c5206ccea8e8905e0a603c6a"></a>WRERR&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a47804de81fecd9e153a0893926279197ac8f0208397c73d7e4e9a353a12e03cae"></a>RDWR&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a47804de81fecd9e153a0893926279197abb336e4beecd5cb2896e832cecd00ca4"></a>ALL&#160;</td><td class="fielddoc">
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a3f7030a8a6230487c674853224ddb915"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sock::net::Reactor::Reactor </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ad616dbb0d11d2d651b5fd244e0e6c609"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual sock::net::Reactor::~Reactor </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a31ff586f2329ba43e73ea5762b4929e7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool sock::net::Reactor::addSource </td>
          <td>(</td>
          <td class="paramtype">sock_t&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197">Event</a>&#160;</td>
          <td class="paramname"><em>event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classsock_1_1net_1_1_net_event_handler.html">NetEventHandler</a> *&#160;</td>
          <td class="paramname"><em>handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>添加事件源 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>套接字 </td></tr>
    <tr><td class="paramname">event</td><td>事件 </td></tr>
    <tr><td class="paramname">handler</td><td>事件处理器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

<p>Implemented in <a class="el" href="classsock_1_1net_1_1detail_1_1_e_poll_reactor.html#a7baa29fa98376bfbecc9847d88a27efe">sock::net::detail::EPollReactor</a>, and <a class="el" href="classsock_1_1net_1_1detail_1_1_select_reactor.html#ac75c1155ea5633a35bf6756321c054ec">sock::net::detail::SelectReactor</a>.</p>

</div>
</div>
<a class="anchor" id="a9bbc07e2fca79e7c09a0be3d80d313bd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool sock::net::Reactor::addSource </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsock_1_1net_1_1_socket.html">Socket</a> *&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197">Event</a>&#160;</td>
          <td class="paramname"><em>event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classsock_1_1net_1_1_net_event_handler.html">NetEventHandler</a> *&#160;</td>
          <td class="paramname"><em>handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>添加事件源 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>套接字 </td></tr>
    <tr><td class="paramname">event</td><td>事件 </td></tr>
    <tr><td class="paramname">handler</td><td>事件处理器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

<p>Implemented in <a class="el" href="classsock_1_1net_1_1detail_1_1_e_poll_reactor.html#a9812156dc8da23d27e82e35160cb6cb4">sock::net::detail::EPollReactor</a>, and <a class="el" href="classsock_1_1net_1_1detail_1_1_select_reactor.html#a3e0f05a7994b016d6012fb353c7a9819">sock::net::detail::SelectReactor</a>.</p>

</div>
</div>
<a class="anchor" id="aca3e0bd8eaf38b10118755a5b22fb4c2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">base::mtime_t sock::net::Reactor::getHeartbeatTime </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取心跳间隔时间 </p>
<dl class="section return"><dt>Returns</dt><dd>base::mtime_t </dd></dl>

</div>
</div>
<a class="anchor" id="acd768d76883d1217bb4cf10a3820990e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void sock::net::Reactor::removeSource </td>
          <td>(</td>
          <td class="paramtype">sock_t&#160;</td>
          <td class="paramname"><em>sock</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>移除事件源 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>套接字 </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classsock_1_1net_1_1detail_1_1_e_poll_reactor.html#a2cf3274e515fd1a8f1e109a0f9ac7697">sock::net::detail::EPollReactor</a>, and <a class="el" href="classsock_1_1net_1_1detail_1_1_select_reactor.html#a3dce50c5abb7c2088dbe3243493f8491">sock::net::detail::SelectReactor</a>.</p>

</div>
</div>
<a class="anchor" id="add2344de23e45df195bd173d05ba2075"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void sock::net::Reactor::removeSource </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsock_1_1net_1_1_socket.html">Socket</a> *&#160;</td>
          <td class="paramname"><em>sock</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>移除事件源 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>套接字 </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classsock_1_1net_1_1detail_1_1_e_poll_reactor.html#a8ac94101ecd364623c62148117ea2a02">sock::net::detail::EPollReactor</a>, and <a class="el" href="classsock_1_1net_1_1detail_1_1_select_reactor.html#a57ada1b09454cb4d49463a8f95e7ee00">sock::net::detail::SelectReactor</a>.</p>

</div>
</div>
<a class="anchor" id="ac117f6b319f740f26bae2036f2b754d6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void sock::net::Reactor::setHeartbeatTime </td>
          <td>(</td>
          <td class="paramtype">base::mtime_t&#160;</td>
          <td class="paramname"><em>time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置心跳间隔时间 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">time</td><td>心跳时间(毫秒) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a479c30f659596b68d0ad820981227ebf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void sock::net::Reactor::tick </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeout</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Tick处理网络事件 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">timeout</td><td>等待超时时间 </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classsock_1_1net_1_1detail_1_1_e_poll_reactor.html#a09b95e05048965654a029b529f74d8a0">sock::net::detail::EPollReactor</a>, and <a class="el" href="classsock_1_1net_1_1detail_1_1_select_reactor.html#a4f46d46b326a7a4f1a88c79032ace5ea">sock::net::detail::SelectReactor</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ac3d9bb4b0f4988c7c174b2febd239b9a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">base::mtime_t sock::net::Reactor::heartbeatTime_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>E:/git/sock/sock/net/<a class="el" href="reactor_8h_source.html">reactor.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
